"""
Author:wmw
"""
#在python中声明变量无需带上变量类型，python会进行自动匹配，同时变量名称区分大小写
x = int(4) # x = 4
X = float(4) # X = 4.0
z = complex(1+2j)
print(x)
print(X)
print(z.real,z.imag,z.conjugate()) # z.real = 1.0  z.imag = 2.0  z.conjugate() = (1-2j)

#三元运算
def compareTest():
    test_str = str('This is true')
    a = test_str if 3 > 2 else 2
    print(a)
    compareTest()
    #以上运算相当于if else的写法，例如：
    # if(3 > 2)
    # { return test_str }
    # else{ return 2 }




